/**
 * loginProcess 로그인 처리
 * date : 2014.11
 * writer : Young
 */

var logout;
var signup;
var login;

function loginProcess() {
	
	login = document.getElementById("btn_login");
	if(login != null){
		var frm1 = document.login;
		
		login.onclick = function() {
			
			if(frm1.m_id.value =="" ){
				alert("아이디가 올바르지 않습니다.");
				frm1.m_id.focus();
			}
			else if( frm1.m_pw.value ==""){
				alert("비밀번호가 올바르지 않습니다.");
				frm1.m_pw.focus();
			}
			else{
				frm1.action="index.jsp?side_login=./member/loginProcess.jsp";
				frm1.submit();
			}
		}
	}
	
	logout = document.getElementById("btn_logout");
	if(logout != null){
		logout.onclick = function() {
			var next = document.login;
			next.action = "index.jsp?side_login=./member/logout.jsp";
			next.submit();
		}
	}
	
	signup = document.getElementById("btn_signup");
	if(signup != null){
		signup.onclick = function() {
			var next = document.login;
			next.action = "index.jsp?page_set=./member/signUp.jsp";
			next.submit();
		}
	}
}

